chore(6937): migrate Snaps date/time pickers from MUI v4 → @mui/x-date-pickers v6#41956
chore(6937): migrate Snaps date/time pickers from MUI v4 → @mui/x-date-pickers v6#41956Copilot wants to merge 27 commits into
Conversation
…pickers) Agent-Logs-Url: https://github.com/MetaMask/metamask-extension/sessions/48e8cda0-8df8-4922-a149-15afc822cec0 Co-authored-by: MajorLift <34228073+MajorLift@users.noreply.github.com>
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
|
@metamaskbot update-policies |
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (5 files, +745 -165)
📜 @MetaMask/policy-reviewers (12 files, +2588 -384)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🧪 @MetaMask/qa (1 files, +65 -135)
|
|
Policies updated. Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes |
Builds ready [f59a55b]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…-date-time-pickers
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [b9896ff]
⚡ Performance Benchmarks (Total: 🟢 0 pass · 🟡 0 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…-date-time-pickers
Builds ready [f9c83aa]
⚡ Performance Benchmarks (Total: 🟢 0 pass · 🟡 0 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [05156d6]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 9 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e00b4d2. Configure here.
Builds ready [e00b4d2]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 7 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
… regression and Test asserts empty string but default placeholder is undefined
Builds ready [f2dca8c]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 10 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [7aca400]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 9 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [82cb305] [reused from 7aca400]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 9 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [ff1c044]
⚡ Performance Benchmarks (Total: 🟢 14 pass · 🟡 9 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Builds ready [6d60166]
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
GuillaumeRx
left a comment
There was a problem hiding this comment.
This completely broke the Snaps UI Date-time picker






Replaces the legacy
@material-ui/pickers(MUI v4-era) dependency with@mui/x-date-pickers@6across the three Snaps date/time picker files.Dependency changes
@mui/x-date-pickers@^6.20.2,@mui/material@^5.18.0,@emotion/react@^11.14.0,@emotion/styled@^11.14.0@material-ui/pickers,@date-io/luxon(adapter now built into@mui/x-date-pickers)snap-ui-date-time-picker.tsx@material-ui/pickers→@mui/x-date-pickers/{DatePicker,DateTimePicker,TimePicker}makeStylesreplaced with a plainpickerInputSxconstant passed viaslotProps.textField.sxclearable,clearLabel,cancelLabel,okLabel); clear/cancel/accept restored viaslotProps.actionBar.actionsvariant: 'standard'withdisableUnderline: trueto preserve the original custom-border looksnap-ui-renderer.jsMuiPickersUtilsProvider+LuxonUtils→LocalizationProvider+AdapterLuxon(both from@mui/x-date-pickers)ThemeProviderimport moved from@material-ui/core/styles→@mui/material/stylesutils.tscreateTheme/ThemeOptionsmoved from@material-ui/core/styles→@mui/material/stylesMuiPickersOverridestype (MUI v4 only)muiPickerThememigrated from v4overrides→ v5components[X].styleOverrides, with component names updated (e.g.MuiPickersModal→MuiDialog,MuiPickersClock→MuiClock, slot keys updated throughout)Test snapshots updated to reflect new MUI v5 class names.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
ofcncog2cu-dsn.algolia.net/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/yarn add @mui/material@^5.18.0 ules��(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/yarn add @emotion/react@^11.14.0 @emotion/styled@^11.14.0 it} --global s/.bin/node committer.email(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Note
Medium Risk
Updates core Snap UI date/time picker rendering and theming while swapping major UI dependencies, which can cause subtle behavior/styling regressions and affects LavaMoat runtime policies across multiple build targets.
Overview
Migrates Snaps date/time picker UI from legacy
@material-ui/pickers/MUI v4 to@mui/x-date-pickers(with MUI v5 theming), updating the picker component implementation, renderer provider (LocalizationProvider+AdapterLuxon), and MUI theme overrides to the v5components.styleOverridesAPI.Removes
@material-ui/pickersand@date-io/luxonfrom dependencies, updates depcheck/yarn config accordingly, and refreshes LavaMoat policies to allow the new@mui/*and@emotion/*dependency graph (while dropping old picker entries).Updates E2E picker interactions to type into readonly MUI v6 inputs instead of clicking calendar/clock controls, and adds a comprehensive unit test suite for
SnapUIDateTimePickerplus snapshot updates for the new MUI markup/classes.Reviewed by Cursor Bugbot for commit 6d60166. Bugbot is set up for automated code reviews on this repo. Configure here.